﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="AddQuizQuestions.aspx.vb" Inherits="Assignment4.AddQuizQuestions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 146px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Add Question to Quiz</h1>
    <asp:Panel ID="pnlAddQustionsContent" runat="server">
  
<p>A quiz must have 6 questions to be submitted</p>
    <p>
        <asp:Label ID="lblNumberOfQuestionsLeft" runat="server"></asp:Label>
    </p>
    <table class="style1">
        <tr>
            <td class="style2">
                Question</td>
            <td>
                <asp:TextBox ID="txtQuestion" runat="server" Height="35px" 
                    style="margin-left: 0px" TextMode="MultiLine" Width="667px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtQuestion" CssClass="lblmessage" 
                    ErrorMessage="Enter Question" ValidationGroup="add">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Possible Answer 1</td>
            <td>
                <asp:TextBox ID="txtPossibleAnswer1" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtPossibleAnswer1" CssClass="lblmessage" 
                    ErrorMessage="Enter Possible Answer 1" ValidationGroup="add">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Possible Answer 2</td>
            <td>
                <asp:TextBox ID="txtPossibleAnswer2" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtPossibleAnswer2" CssClass="lblmessage" 
                    ErrorMessage="Enter Possible Answer 2" ValidationGroup="add">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Possible Answer 3</td>
            <td>
                <asp:TextBox ID="txtPossibleAnswer3" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="txtPossibleAnswer3" CssClass="lblmessage" 
                    ErrorMessage="Enter Possible Answer 3" ValidationGroup="add">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Possible Answer 4</td>
            <td>
                <asp:TextBox ID="txtPossibleAnswer4" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="txtPossibleAnswer4" CssClass="lblmessage" 
                    ErrorMessage="Enter Possible Answer 4" ValidationGroup="add">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Correct Answer
            </td>
            <td>
                <asp:DropDownList ID="drpPossibleAnswers" runat="server">
                    <asp:ListItem Value="Quiz_QuestionPossibleAnswer1">Possible Answer1</asp:ListItem>
                    <asp:ListItem Value="Quiz_QuestionPossibleAnswer2">Possible Answer 2</asp:ListItem>
                    <asp:ListItem Value="Quiz_QuestionPossibleAnswer3">Possible Answer 3</asp:ListItem>
                    <asp:ListItem Value="Quiz_QuestionPossibleAnswer4">Possible Answer 4</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style2">
&nbsp;Answer Explenation</td>
            <td style="margin-left: 80px">
                <asp:TextBox ID="txtAnswerExplenation" runat="server" Height="55px" 
                    style="margin-left: 0px; margin-bottom: 0px;" TextMode="MultiLine" 
                    Width="667px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="txtAnswerExplenation" CssClass="lblmessage" 
                    ErrorMessage="Enter Answer Explenation" ValidationGroup="add">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Picture
            </td>
            <td style="margin-left: 80px">
                <asp:FileUpload ID="fuPictureUrl" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td style="margin-left: 80px">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td style="margin-left: 80px">
                <asp:Button ID="btnAddQuestion" runat="server" Text="Add Question" 
                    Width="159px" ValidationGroup="add" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td style="margin-left: 80px">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                    CssClass="lblmessage" ValidationGroup="add" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td style="margin-left: 80px">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td style="margin-left: 80px">
                <asp:Label ID="lblMessage" runat="server"></asp:Label>
            </td>
        </tr>
    </table>
      </asp:Panel>
    <asp:Panel ID="pnlQuizSubmitted" runat="server" Visible="False">
    <p>Maximum number of questions to be added is reached. </p>
    </asp:Panel>
    <br />
    <br />
    
  
</asp:Content>
